<?xml version="1.0" encoding="utf-8"?>
<openerp>
	<data>
		<record id="view_param_summary_project_contract_report" model="ir.ui.view">
			<field name="name">view.param.summary.project.contract.report</field>
			<field name="model">param.summary.project.contract.report</field>
			<field name="type">form</field>
			<field name="arch" type="xml">
				<form string="Timesheet Report">
					<notebook colspan="4">
						<page string="Date">
							<group>
								<field name="date_selection" on_change="onchange_date_selection(date_selection)"/>
								<field name="date_from" attrs="{'invisible': [('date_selection','!=','date_sel')]}"/>
								<field name="date_to" attrs="{'invisible': [('date_selection','!=','date_sel')]}"/>
							</group>
						</page>
						<page string="Project">
							<group>
								<field name="filter_selection" on_change="onchange_filter_selection(filter_selection)"/>
								<field name="project_default_from" attrs="{'invisible': [('filter_selection','!=','def')], 'required': [('filter_selection','=','def')]}"
									options='{"quick_create": false}'/>
								<field name="project_default_to" attrs="{'invisible': [('filter_selection','!=','def')], 'required': [('filter_selection','=','def')]}"
									options='{"quick_create": false}'/>
								<field name="project_input_from"
									attrs="{'invisible': [('filter_selection','!=','input')], 'required': [('filter_selection','=','input')]}"/>
								<field name="project_input_to"
									attrs="{'invisible': [('filter_selection','!=','input')], 'required': [('filter_selection','=','input')]}"/>
							</group>
							<field name="project_name_ids" 
								attrs="{'invisible': [('filter_selection','!=','selection')], 'required': [('filter_selection','=','selection')]}" nolabel="1">
								<tree>
									<field name="name" string="Project Name"/>
								</tree>
							</field>	
						</page>
						<page string="Customer" name="filters_cust_name">
		                        <group string="">
		                        	<field name="cust_filter_selection" on_change="onchange_filter_cust_selection(cust_filter_selection)"/> 
		                        	<field name="cust_name_def_from" domain="[('customer','=',True)]"
			                        	attrs="{'invisible': [('cust_filter_selection','!=','def')], 'required': [('cust_filter_selection','=','def')]}"
										/>
									<field name="cust_name_def_to" domain="[('customer','=',True)]"
										attrs="{'invisible': [('cust_filter_selection','!=','def')], 'required': [('cust_filter_selection','=','def')]}"
										/>
									<field name="cust_name_input_from"
										attrs="{'invisible': [('cust_filter_selection','!=','input')], 'required': [('cust_filter_selection','=','input')]}"
										/>
									<field name="cust_name_input_to"
										attrs="{'invisible': [('cust_filter_selection','!=','input')], 'required': [('cust_filter_selection','=','input')]}"
										/>  	 
		                        </group>
		                        	<field name="partner_ids" domain="[('customer','=',True)]"
										attrs="{'invisible': [('cust_filter_selection','!=','selection')], 'required': [('cust_filter_selection','=','selection')]}" nolabel="1"
										/>
						</page> 
						<!-- <page string="Currency" name="filters_currency">
		                        <group string="">
		                        	<field name="curr_filter_selection" on_change="onchange_filter_curr_selection(curr_filter_selection)"/> 
		                        	<field name="curr_name_def_from" 
			                        	attrs="{'invisible': [('curr_filter_selection','!=','def')], 'required': [('curr_filter_selection','=','def')]}"
										/>
									<field name="curr_name_def_to" 
			                        	attrs="{'invisible': [('curr_filter_selection','!=','def')], 'required': [('curr_filter_selection','=','def')]}"
										/>	 
									<field name="curr_name_input_from"
										attrs="{'invisible': [('curr_filter_selection','!=','input')], 'required': [('curr_filter_selection','=','input')]}"
										/>
									<field name="curr_name_input_to"
										attrs="{'invisible': [('curr_filter_selection','!=','input')], 'required': [('curr_filter_selection','=','input')]}"
										/> 
		                        </group>
		                        	<field name="currency_ids"
										attrs="{'invisible': [('curr_filter_selection','!=','selection')], 'required': [('curr_filter_selection','=','selection')]}" nolabel="1"
										/> 
						</page> --> 
						<page string="Sort By">
							<field name="sortby_ids">
		                        <tree string="Sort by" editable="bottom">
		                            <field name="seq" />
		                            <field name="sort_by"/>
		                        </tree>
                   			</field>
						</page>
					</notebook>
					<footer>
						<button name="create_vat" string="Print as PDF" type="object" default_focus="1" class="oe_highlight"/>
	                    or
	                    <button name="print_report" string="Print as XLS" type="object" class="oe_highlight" context="{'xls_output':1}"/>
		            	or
	                    <button string="Cancel" class="oe_link" special="cancel"/>
					</footer>
				</form>
			</field>
		</record>

		<record id="action_param_summary_project_contract_report" model="ir.actions.act_window">
			<field name="name">Summary Project Contract</field>
			<field name="type">ir.actions.act_window</field>
			<field name="res_model">param.summary.project.contract.report</field>
			<field name="view_type">form</field>
			<field name="view_mode">form</field>
			<field name="target">new</field>
			<field name="help">This menu print Summary Project Contract Report.</field>
		</record>

		<menuitem name="Summary Project Contract Report" parent="menu_project_report" groups="project.group_project_manager"
			action="action_param_summary_project_contract_report" id="menu_summary_project_contract_report" sequence="3"/>

	</data>
</openerp>
